﻿<%@ Page Title="DEMI - Sklep internetowy" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="SklepInternetowy.aspx.cs" Inherits="DEMI_webapp.SklepInternetowy" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <asp:Label ID="Label1" runat="server" Text="Produktów w koszyku: "></asp:Label>
    <asp:Label ID="Label2" runat="server" Text="0"></asp:Label>
    <br />
    <asp:Label ID="Label3" runat="server" Text="Do zapłaty: "></asp:Label>
    <asp:Label ID="Label4" runat="server" Text="0 zł"></asp:Label>
    <br />
    <asp:ImageButton ID="Button1" runat="server" Width="200" Height="50" PostBackUrl="Koszyk.aspx"
        OnClick="Button1_Click" ImageUrl="~/Styles/images/BUTTONzawartośćKoszyka.png" />
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False"
        CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None"
        OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="nazwa" HeaderText="Model" SortExpression="nazwa" />
            <asp:BoundField DataField="kolor" HeaderText="Kolor" SortExpression="kolor" />
            <asp:BoundField DataField="cena" HeaderText="Cena (zł/szt)" SortExpression="cena" />
            <asp:BoundField DataField="material" HeaderText="Materiał" SortExpression="material" />
            <asp:BoundField DataField="ilosc" HeaderText="Sztuk" SortExpression="ilosc" />
            <asp:TemplateField HeaderText="Ilość">
                <ItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Width="30" Text=""></asp:TextBox>
                    <asp:RegularExpressionValidator runat="server" ID="valNumbersOnly" ControlToValidate="TextBox1"
                        Display="Dynamic" ErrorMessage="Tylko liczby" ValidationExpression="(^([0-9]*|\d*\d{1}?\d*)$)">
                    </asp:RegularExpressionValidator>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ButtonType="Button" SelectText="Dodaj do koszyka" ShowSelectButton="True" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:conString %>"
        SelectCommand="SELECT [nazwa], [kolor], [cena], [material], [ilosc], [zdjecie] FROM [Kapelusze]">
    </asp:SqlDataSource>
    <br />
</asp:Content>
